package br.ucb.tcc.enuns;

import br.ucb.tcc.actions.BotSystemAction;
import br.ucb.tcc.actions.InitUserInfo;
import br.ucb.tcc.actions.UserInfo;

public enum BotSystemActionInfo {
	
	INITUSERINFO("INI", new InitUserInfo()),
	USERINFO("INF", new UserInfo());
	
	private String simblol;
	@SuppressWarnings("rawtypes")
	private BotSystemAction action;	
		
	public String getSimblol() {
		return simblol;
	}
	public void setSimblol(String simblol) {
		this.simblol = simblol;
	}
	@SuppressWarnings("rawtypes")
	public BotSystemAction getAction() {
		return action;
	}
	@SuppressWarnings("rawtypes")
	public void setAction(BotSystemAction action) {
		this.action = action;
	}

	@SuppressWarnings("rawtypes")
	private BotSystemActionInfo(String simblol, BotSystemAction action) {
		this.simblol = simblol;
		this.action = action;
	}	
	
	public static BotSystemActionInfo findBySimblol(String simblol){
		for (BotSystemActionInfo action : values()) {
			if(simblol.equals(action.getSimblol()))
				return action;
		}		
		return null;
	}
	
	
}
